import request from "@/utils/request";
import qs from "qs"
import id from "element-ui/src/locale/lang/id";

let url = '/smartstudio/user'

export default {
    selectUserPage(page, pageSize, name) {
        return request.get(url, {
            params: {
                page: page,
                pageSize: pageSize,
                name: name
            }
        })
    },
    verification(username)
    {
        return request.get(url+"/verification",{
            params:{
                username:username
            }
        })
    },
    deleteAll(data)
    {
        return request.delete(url+"/removeAll",{data})
    },
    addUser(data) {
        return request.post(url, data)
    },

    updateUser(data) {
        return  request.put(url, data)
    },

    deleteUser(data) {
        return  request.delete(url,{data})
    },

    signIn(user) {
        return request.post(url + "/login", user)
    },

    signUp(user) {
        return request.post(url + '/signUp', user)
    },

    updateMine(user) {
        return request.post(url + '/mine', user)
    },

    selectUserByName() {
        return request.get(url + '/mine')
    },
    userCount() {
        return request.get(url + '/count')
    }
}














/*export const selectUserPage = (page, pageSize, name) => request.get(url, {
    params: {
        page: page,
        pageSize: pageSize,
        name: name
    }
})

export const addUser = (data) => request.post(url, data)

export const updateUser = (data) => request.put(url, data)

export const deleteUser = (data) => request.delete(url,{data})*/
